//
//  MYGIMMessageListModel.swift
//  MYGrow
//
//  Created by 小火科技 on 2024/3/11.
//

import HandyJSON

enum MYGIMMessageType: String, HandyJSONEnum {
case file = "file"
case link = "link"
case system = "system"
case group_apply = "group_apply"
case group_invitation = "group_invitation"
case kbs_list = "kbs_list"
case group_chat_notice = "group_chat_notice"
case voice = "voice"
case group_notice = "group_notice"
case friend_apply = "friend_apply"
case card = "card"
case location = "location"
case single = "single"
case service = "service"
case chat = "default"
case image = "image"
case empty = ""
case apply1 = "apply1"
case apply2 = "apply2"
case apply3 = "apply3"
case apply4 = "apply4"
case apply5 = "apply5" //apply1=健康数据申请,apply2=生活习惯申请,apply3=健康史申请,apply4=病历夹申请,apply5=体检报告申请
    
    var applyIndex: Int {
        switch self {
        case .apply1:
            1
        case .apply2:
            2
        case .apply3:
            3
        case .apply4:
            4
        case .apply5:
            5
        default: 0
        }
    }
}


class MYGIMMessageListModel: HandyJSON {
    var session: [MYGIMMessageListSessionModel] = []
    var data = MYGIMMessageListDataModel()
    required init() {
        
    }
}

class MYGIMMessageListDataModel: HandyJSON {
    var refresh = ""
    var method = ""
    
    required init() {
        
    }
}

class MYGIMMessageListSessionModel: HandyJSON {
    var mo_shenggx = 0
    var sessionInfo = MYGIMMessageListDetailModel()
    var lastMessage = MYGIMMessageListLastMessageModel()
    var unreadMessagesNumber = 0
    
    required init() {
    }
}

class MYGIMMessageListLastMessageModel: HandyJSON {
    var last_time = ""
    var last_message = ""
    var unread_fixed_msg = ""
    var is_destruction = 0
    required init() {
        
    }
}

class MYGIMMessageListDetailModel: HandyJSON {
    var id = 0
    var type = MYGIMMessageType.single
    var user_one = 0
    var user_two = 0
    var chat_id = 0
    var createtime = 0
    var deletuser = 0
    var gc_history_message = ""
    var jointime = 0
    var m_createtime = 0
    var top = ""
    var pushUser = MYGIMMessageListPushUserModel()
    var searchContinue = true
    
    var windowType = "new_friends_message"
    var sessionUser = MYGIMMessageListPushUserModel()
    var user = MYGIMMessageListPushUserModel()
    required init() {
        
    }
}

class MYGIMMessageListPushUserModel: HandyJSON {
    var id = 0
    var type = ""
    var avatar = ""
    var nickname = ""
    var status = MYGIMMessageListUserStatus()
    var bio = ""
    var gender = MYGIMMessageListUserStatus()
    var welcome_msg = ""
    var group = ""
    var friend = false
    var remark = ""
    var nickname_origin = ""
    var mobile = ""
    
    required init() {
    }
}

class MYGIMMessageListUserStatus: HandyJSON {
    var value = 0
    var chinese = ""
    
    required init() {
    }
}


class MYGUserInfoTokenModel: HandyJSON {
    var admin_id = 0
    var auth_token = ""
    var avatar = ""
    var email = ""
    var id = 0
    var identity = ""
    var mobile = ""
    var nickname = ""
    var status = 0
    var token = ""
    var type = ""
    var user_id = 0
    required init(){}
    
}



class MYGUserInfoChatModel: HandyJSON {
    var userinfo = MYGUserInfoTokenModel()
    
    required init(){}
    
}

class MYGUserTipInfoChatModel: HandyJSON {
    var msg = ""
    var type = ""
    required init(){}
    
}
